<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The TokyoTyrantIterator class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="tokyotyrantquery.valid.html">TokyoTyrantQuery::valid</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="tokyotyrantiterator.construct.html">TokyoTyrantIterator::__construct</a></div>
 <div class="up"><a href="book.tokyo-tyrant.html">tokyo_tyrant</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.tokyotyrantiterator" class="reference">

 <h1 class="title">The TokyoTyrantIterator class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL tokyo_tyrant &gt;= 0.2.0)</p>


  <div class="section" id="tokyotyrantiterator.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    Provides an iterator for TokyoTyrant and TokyoTyrantTable objects. The iterator iterates over
    all keys and values in the database. TokyoTyrantIterator was added in version 0.2.0.
   </p>
  </div>


  <div class="section" id="tokyotyrantiterator.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">TokyoTyrantIterator</strong>
     </span>
     
     <span class="ooclass">
      <span class="modifier">implements</span>
      <strong class="classname">Iterator</strong>
     </span>
     {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="tokyotyrantiterator.construct.html" class="methodname">__construct</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$object</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="tokyotyrantiterator.current.html" class="methodname">current</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="tokyotyrantiterator.key.html" class="methodname">key</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="tokyotyrantiterator.next.html" class="methodname">next</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="tokyotyrantiterator.rewind.html" class="methodname">rewind</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="tokyotyrantiterator.valid.html" class="methodname">valid</a></span>
    ( <span class="methodparam">void</span>
   )</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Inherited methods */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">number</span><span class="methodname"><a href="tokyotyrant.add.html" class="methodname">TokyoTyrant::add</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.number" class="type number">number</a></span> <code class="parameter">$increment</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$type</code><span class="initializer"> = 0</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.connect.html" class="methodname">TokyoTyrant::connect</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$host</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$port</code><span class="initializer"> = TokyoTyrant::RDBDEF_PORT</span></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$options</code></span>
  ]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.connecturi.html" class="methodname">TokyoTyrant::connectUri</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$uri</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="tokyotyrant.construct.html" class="methodname">TokyoTyrant::__construct</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$host</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$port</code><span class="initializer"> = TokyoTyrant::RDBDEF_PORT</span></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$options</code></span>
  ]]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.copy.html" class="methodname">TokyoTyrant::copy</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$path</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="tokyotyrant.ext.html" class="methodname">TokyoTyrant::ext</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$options</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">array</span><span class="methodname"><a href="tokyotyrant.fwmkeys.html" class="methodname">TokyoTyrant::fwmKeys</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$prefix</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$max_recs</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="tokyotyrant.get.html" class="methodname">TokyoTyrant::get</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$keys</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrantIterator</span><span class="methodname"><a href="tokyotyrant.getiterator.html" class="methodname">TokyoTyrant::getIterator</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="tokyotyrant.num.html" class="methodname">TokyoTyrant::num</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.out.html" class="methodname">TokyoTyrant::out</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$keys</code></span>
   
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.put.html" class="methodname">TokyoTyrant::put</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$keys</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code><span class="initializer"> = NULL</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.putcat.html" class="methodname">TokyoTyrant::putCat</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$keys</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.putkeep.html" class="methodname">TokyoTyrant::putKeep</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$keys</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.putnr.html" class="methodname">TokyoTyrant::putNr</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$keys</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code><span class="initializer"> = NULL</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="tokyotyrant.putshl.html" class="methodname">TokyoTyrant::putShl</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$width</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="tokyotyrant.restore.html" class="methodname">TokyoTyrant::restore</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$log_dir</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$timestamp</code></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$check_consistency</code><span class="initializer"> = true</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="tokyotyrant.setmaster.html" class="methodname">TokyoTyrant::setMaster</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$host</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$port</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$timestamp</code></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$check_consistency</code><span class="initializer"> = true</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="tokyotyrant.size.html" class="methodname">TokyoTyrant::size</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">array</span><span class="methodname"><a href="tokyotyrant.stat.html" class="methodname">TokyoTyrant::stat</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="tokyotyrant.sync.html" class="methodname">TokyoTyrant::sync</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.tune.html" class="methodname">TokyoTyrant::tune</a></span>
    ( <span class="methodparam"><span class="type">float</span> <code class="parameter">$timeout</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$options</code><span class="initializer"> = TokyoTyrant::RDBT_RECON</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="tokyotyrant.vanish.html" class="methodname">TokyoTyrant::vanish</a></span>
    ( <span class="methodparam">void</span>
   )</div>


   }</div>


  </div>

 </div>

 











































<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="tokyotyrantiterator.construct.html">TokyoTyrantIterator::__construct</a> — Construct an iterator</li><li><a href="tokyotyrantiterator.current.html">TokyoTyrantIterator::current</a> — Get the current value</li><li><a href="tokyotyrantiterator.key.html">TokyoTyrantIterator::key</a> — Returns the current key</li><li><a href="tokyotyrantiterator.next.html">TokyoTyrantIterator::next</a> — Move to next key</li><li><a href="tokyotyrantiterator.rewind.html">TokyoTyrantIterator::rewind</a> — Rewinds the iterator</li><li><a href="tokyotyrantiterator.valid.html">TokyoTyrantIterator::valid</a> — Rewinds the iterator</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="tokyotyrantquery.valid.html">TokyoTyrantQuery::valid</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="tokyotyrantiterator.construct.html">TokyoTyrantIterator::__construct</a></div>
 <div class="up"><a href="book.tokyo-tyrant.html">tokyo_tyrant</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
